package common

import(
	"fmt"
	"github.com/google/martian/log"
	"gopkg.in/gomail.v2"
)
func SendEmail(recv string){
	m := gomail.NewMessage()
	m.SetHeader("From", EMAIL_SENDER)
	m.SetHeader("To")
	m.SetHeader("Subject","Hello")
	m.SetBody("text/html",fmt.Sprintf("Hello %v",recv))
	d := gomail.NewDialer("smtp.qq.com",587, EMAIL_SENDER,"")
	if err := d.DialAndSend(m);err != nil {
		log.Errorf("Fail to send message to %v",recv)
	}
}
